Received-Date: Mon, 11 Apr 1994 12:53:05 +0200From: pottier@clipper.ens.fr (Francois Pottier)Subject: csmp-digest-v3-012To: csmp-digest@ens.frDate: Mon, 11 Apr 94 12:52:57 MET DSTX-Mailer: ELM [version 2.3 PL11]Errors-To: listman@ens.frReply-To: pottier@clipper.ens.frX-Sequence: 14--------------------PowerMacCrash 2K--------------------C.S.M.P. Digest Mon, 11 Apr 94 Volume 3 : Issue 12 Today's Topics: Antialiasing code-algo somewhere? Finding full path names Global cursor change: how to? Graphic Elements: an element that isn't there How do I read digital samples from an audio CD? I crashed a Power Mac! Multiple HD Reads, can it be done? PBDTGetAPPL on a network volume? PEF, XCOFF Info Wanted QuickDraw Question Quickdraw Blend Function Inaccurate? Read-Save Styled Text Code Try 3: Movie Credit Scrolling - How? making fat binaries questionThe Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier(pottier@clipper.ens.fr). The digest is a collection of article threads from the internet newsgroupcomp.sys.mac.programmer. It is designed for people who read c.s.m.p. semi-regularly and want an archive of the discussions. If you don't know what anewsgroup is, you probably don't have access to it. Ask your systemsadministrator(s) for details. If you don't have access to news, you maystill be able to post messages to the group by using a mail server likeanon.penet.fi (mail help@anon.penet.fi for more information). Each issue of the digest contains one or more sets of articles (calledthreads), with each set corresponding to a 'discussion' of a particularsubject. The articles are not edited; all articles included in this digestare in their original posted form (as received by our news server atnef.ens.fr). Article threads are not added to the digest until the lastarticle added to the thread is at least two weeks old (this is to ensure thatthe thread is dead before adding it to the digest). Article threads thatconsist of only one message are generally not included in the digest.The digest is officially distributed by two means, by email and ftp.If you want to receive the digest by mail, send email to listserv@ens.frwith no subject and one of the following commands as body: help Sends you a summary of commands subscribe csmp-digest Your Name Adds you to the mailing list signoff csmp-digest Removes you from the listOnce you have subscribed, you will automatically receive each newissue as it is created.The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest.Questions related to the ftp site should be directed toscott.silver@dartmouth.edu. Currently no previous volumes of the CSMPdigest are available there.Also, the digests are available to WAIS users as comp.sys.mac.programmer.src.------------------------------------------------------->From mcmath@csb1.nlm.nih.gov (Charles F. McMath)Subject: Antialiasing code-algo somewhere?Date: Fri, 25 Mar 94 15:44:51 GMTOrganization: National Library of Medicine(Tried to post this last night, looks like it didn't work. Thatwill explain any duplicates floating around...)I have a TIFF image I'm displaying in a window; however, it needsto be antialiased. I've seen some antialiasing code that works ontext, but it's written in Think C with inline assembly. I need todo something in MPW, and would prefer straight C code.Anybody have any pointers as to where I can look? If such codeexists, that'd be great, but I'll take leads to books, articles, etc,on antialiasing. Note this is dealing with generalized graphics,not text (which I read last night, 32-bit QD can antialias - seedevelop issue 1, I think).Thanks to all!chuck+--------------------------------------------------------------------------+| Chuck McMath * On Line Computer Systems, Inc. * chuck@ocs.com || Hey batter, hey batter, hey batter, swing!" - Anon. || Best Album of 1994: "Barney & Friends" Best Song: Barney's "I Love You" |+--------------------------------------------------------------------------++++++++++++++++++++++++++++>From lowry@shiva.eche.ualberta.ca (Brian Lowry)Date: 25 Mar 1994 20:58:58 GMTOrganization: Chem Eng - Univ of AlbertaIn article <1994Mar25.154451.1487@nlm.nih.gov>, mcmath@csb1.nlm.nih.gov(Charles F. McMath) wrote:> I have a TIFF image I'm displaying in a window; however, it needs> to be antialiased. I've seen some antialiasing code that works on> text, but it's written in Think C with inline assembly. I need to> do something in MPW, and would prefer straight C code. Draw the TIFF in an offscreen 24 bit GWorld and then Update the GWorld tothe desired size - you should get an anti-aliased version of your image(inasmuch as simple averaging is anti-aliasing -- some might argue itisn't). All included gratis, thanks to 32 bit Quickdraw...-- Brian Lowry+++++++++++++++++++++++++++>From markhanrek@aol.com (MarkHanrek)Date: 27 Mar 1994 01:16:02 -0500Organization: America Online, Inc. (1-800-827-6364)In article <1994Mar25.154451.1487@nlm.nih.gov>, mcmath@csb1.nlm.nih.gov(Charles F. McMath) writes:You might look in the "Graphic Gems" source code collection, and also in "NIHImage". Sorry, I'm unable to specify where you can find these.Mark Hanrek--------------------------->From mike <Mike.Doyle@comp.vuw.ac.nz>Subject: Finding full path namesDate: 21 Mar 1994 21:35:56 GMTOrganization: Comp Sci Dept. VUWI have been attempting to use the std file package to get full pathnames for files. What I want to do is use SFGetFileto select a file and then return the full pathname for that file.Is there any way of getting the full pathname of the default directory? Mac Revealed says the vRefNum is the reference number of the default directory but as far as I can tell it is the reverencenumber of the volume (irrespective of the directory within that vol).I suppose I want a way of doing the equialent of the UNIX command pwd.Any ideas suggestions..mikeps I know you are not supposed to refer to files by pathnames but thisis for a first course in programming and vRefNums and FileRefNums is abit heavy at this stage.==============================================================mike@comp.vuw.ac.nzmike.doyle@vuw.ac.nzMathematics and Computer Science Departments3rd Floor Cotton Building Victoria UniversityP O Box 600 Phone: + 64 4 472 1000 x8874Wellington, New Zealand. Fax: + 64 4 471 2070==============================================================+++++++++++++++++++++++++++>From walkerm@acf2.nyu.edu (Michael A. Walker)Date: Thu, 24 Mar 1994 18:52:15 -0500Organization: New York UniversityIn article <2ml3vs$ccc@st-james.comp.vuw.ac.nz>, mike<Mike.Doyle@comp.vuw.ac.nz> wrote:> I have been attempting to use the std file package to get > full pathnames for files. What I want to do is use SFGetFile> to select a file and then return the full pathname for that > file.> The code to do this isn't really that hard. SFGetFile, and itscousins, return the volume name and directory of the file selectedin its dialog. You can use this with the following:void PathNameFromDirID(long dirID, short vRefNum, StringPtr fullPathName){ CInfoPBRec block; Str255 directoryName; OSErr err; fullPathName[0] = '\0'; block.dirInfo.ioDrParID = dirID; block.dirInfo.ioNamePtr = directoryName; do { block.dirInfo.ioVRefNum = vRefNum; block.dirInfo.ioFDirIndex = -1; block.dirInfo.ioDrDirID = block.dirInfo.ioDrParID; err = PBGetCatInfo(&block, FALSE); pstrcat(directoryName, (StringPtr)"\p:"); pstrinsert(fullPathName, directoryName); } while (block.dirInfo.ioDrDirID != 2);}where fullPathName is a pointer to a string (pascal string, if Iremember correctly) you give the function to store the fullpath name. The functions 'pstrcat' and 'pstrinsert' are definedas:void pstrcat(StringPtr dst, StringPtr src){ BlockMove(src + 1, dst + *dst + 1, *src); *dst += *src;}void pstrinsert(StringPtr dst, StringPtr src){ BlockMove(dst + 1, dst + *src + 1, *dst); BlockMove(src + 1, dst + 1, *src); *dst += *src;}Hope this helps.-- Michael A. WalkerNew York Universitywalkerm@acf2.nyu.edu==============================================------------------------8-;main() {int x,y,k;char *b=" .:,;!/>)|&IH%*#@";doublecr,ci,zr,zi,temp,cx,cy;for(y=30;puts(""),cy=y*0.1-1.5,y-->=0;){for(x=0;cx=x*0.04-2,zr=0,zi=0,x++<75;){for(cr=cx,ci=cy,k=0;temp=zr*zr-zi*zi+cr,zi=2*zr*zi+ci,zr=temp,k<112;k++)if(zr*zr+zi*zi>10)break;printf("%c",b[k%16]);}}} /* try this on forsize!! */+++++++++++++++++++++++++++>From d88-jwa@mumrik.nada.kth.se (Jon Wdtte)Date: 25 Mar 1994 08:35:26 GMTOrganization: The Royal Institute of TechnologyIn <walkerm-240394185215@walker.infocenter.nyu.edu> walkerm@acf2.nyu.edu (Michael A. Walker) writes:> do {> block.dirInfo.ioVRefNum = vRefNum;> block.dirInfo.ioFDirIndex = -1;> block.dirInfo.ioDrDirID = block.dirInfo.ioDrParID;> err = PBGetCatInfo(&block, FALSE);> pstrcat(directoryName, (StringPtr)"\p:");> pstrinsert(fullPathName, directoryName);> } while (block.dirInfo.ioDrDirID != 2);So if you get an error, you wil just keep loopingwithout ever leaving the loop?Cheers, / h+-- -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe -- CORRECTLY in this case meaning to the language spec, not to the naive expectations of the programmer.+++++++++++++++++++++++++++>From Carl R. Osterwald <carl_osterwald@nrel.gov>Date: Fri, 25 Mar 94 16:06:09 GMTOrganization: National Renewable Energy LaboratoryIn article <walkerm-240394185215@walker.infocenter.nyu.edu> Michael A.Walker, walkerm@acf2.nyu.edu writes:> fullPathName[0] = '\0';. . . >where fullPathName is a pointer to a string (pascal string, if I>remember correctly) you give the function to store the full>path name.Using a Pascal string for the result will fail if the resultant full pathname exceeds 255 characters, which is entirely possible. This is onereason why the OS never really uses full path names, and why theStandardFile routines use FSSpecs instead.+++++++++++++++++++++++++++>From robert@fpksu65.bv.tu-berlin.de (Robert Uebbing)Date: 27 Mar 1994 09:56:25 GMTOrganization: TU BerlinIn article <A9B85A01E0027D1A@cro.nrel.gov>, Carl R. Osterwald<carl_osterwald@nrel.gov> wrote:> > In article <walkerm-240394185215@walker.infocenter.nyu.edu> Michael A.> Walker, walkerm@acf2.nyu.edu writes:> > fullPathName[0] = '\0';> .> .> .> >where fullPathName is a pointer to a string (pascal string, if I> >remember correctly) you give the function to store the full> >path name.> > Using a Pascal string for the result will fail if the resultant full path> name exceeds 255 characters, which is entirely possible. This is one> reason why the OS never really uses full path names, and why the> StandardFile routines use FSSpecs instead.well, the main reason why the MacOS uses FSSpecs to identify files isthat the full file path name is *not* definite. you can give differentvolumes with the same name and therefore have the identical full pathname for different files (opposed to the unix and dos file system).robbi************************************************************************ Robert Uebbing ** - Institut fuer Photogrammetrie und Kartographie an der TU Berlin - ** - Institute for Photogrammetry and Cartography TU Berlin, Germany - ************************************************************************--------------------------->From AIKEN <INRA000@MUSICB.MCGILL.CA>Subject: Global cursor change: how to?Date: Sun, 27 Mar 1994 05:19:26 GMTOrganization: McGill University I'm writing a background app that kicks in every once in a while,and I would like to communicate the fact that I'm working to the user.I figured a cute way of doing this would be an Auto-Doubler-like cusorswitch (For the unfamiliar, AD changes the cursor to "AD" when it'sworking on your drive). However, cursor changes seem to be local to an app, i.e. the cursoronly actually gets changed on a SetCursor() call if your app is in theforeground. So, of course, calling setCursor() from a background appseems to have no effect at all. Is there a way of accomplishing what I wish to do? Any adviceappreciated. Cheers, Mark Aiken inra@musicb.mcgill.ca+++++++++++++++++++++++++++>From markhanrek@aol.com (MarkHanrek)Date: 27 Mar 1994 01:28:06 -0500Organization: America Online, Inc. (1-800-827-6364)AutoDoubler and Public Utilities and other things which change the cursor whenthey are active have one thing in common -- they are all extensions.When extensions patch a trap, such as SetCursor, they patch it before anyapplications are active, and affect the behavior of all that follows.But if an application patches SetCursor, it only impacts itself when it isactive.To be able to affect the cursor "globally" no matter what, an extension of somesort will be required ( a helper extension or full blown doohickie ).Have fun! :)Mark Hanrek+++++++++++++++++++++++++++>From Robin J. Lunge <rjl1@cornell.edu>Date: 28 Mar 1994 02:40:25 GMTOrganization: Cornell UniversityTo set the cursor from the background, you can fiddle with the low-memoryglobals TheCrsr and CrsrNew. The former contains the current (1-bit)cursor. The latter has to be tickled to get the system to actually showthe change.+++++++++++++++++++++++++++>From pottier@trimaran.ens.fr (Francois Pottier)Date: 28 Mar 1994 14:10:42 GMTOrganization: Ecole Normale Superieure, PARIS, FranceIn article <2n5g2pINN450@newsstand.cit.cornell.edu>,Robin J. Lunge <rjl1@cornell.edu> wrote:>To set the cursor from the background, you can fiddle with the low-memory>globals TheCrsr and CrsrNew. The former contains the current (1-bit)>cursor. The latter has to be tickled to get the system to actually show>the change.Another, cleaner way (IMHO) is to record the address of _SetCursor atINIT time, and then call it directly. Thus you're able to bypass Multifinder'spatch and change the cursor even when you're in the background.The only drawback is that you need an INIT. In my case it didn't matterbecause I already had one.-- Francois Pottierpottier@dmi.ens.fr+++++++++++++++++++++++++++>From wdh@netcom.com (Bill Hofmann)Date: Mon, 28 Mar 1994 17:51:23 GMTOrganization: NETCOM On-line Communication Services (408 241-9760 guest)>In article <2n5g2pINN450@newsstand.cit.cornell.edu>,>Robin J. Lunge <rjl1@cornell.edu> wrote:>>To set the cursor from the background, you can fiddle with the low-memory>>globals TheCrsr and CrsrNew. The former contains the current (1-bit)>>cursor. The latter has to be tickled to get the system to actually show>Another, cleaner way (IMHO) is to record the address of _SetCursor at>INIT time, and then call it directly. Thus you're able to bypass Multifinder's>>The only drawback is that you need an INIT. In my case it didn't matterEeek. But if you get the address of SetCursor and call it directly, youalso lose any *other* patches installed, that the USER has installed,like ClikChange or other abominations. To do it right, you should *patch* SetCursor, and normally have your patchbe a no-op. A modern Mac way to communicate easily would be to set up a: 1. SetCursor patch which looks at a variable to determine whehter to fool with the cursor 2. a Gestalt selector which either provides the address of said variable or a pointer to a function to call which would set the variable and do other thingsSince the original poster seems to want to (probably) animate the cursoror some such thing, one useful way to do this would be to use the Gestaltproc to return the address of a function which either a. fired off a VBL task which animates the cursor (being sure to check CrsrBusy before calling SetCursor) b. turns off the VBL task.Ugh. Getting complex...-- -Bill Hofmann wdh@netcom.COM Fresh Software and Instructional Design +1 510 524 0852--------------------------->From al@crucible.powertools.com (Al Evans)Subject: Graphic Elements: an element that isn't thereDate: 28 Mar 94 17:54:34 GMTOrganization: PowerTools, Austin, TexasThis is an answer to a question about Graphic Elements which severalpeople have asked me in email. If you don't have Graphic Elements,skip this article -- or better yet, go ftp it from mac.archive.umich.edu(or its mirror sites): /mac/misc/demo/graphicelementsdemo.sit.hqx.Don't be put off by the name: the file includes a Think C 6.0linkable library and example programs with source code.The following simple Graphic Element has two basic uses:1) It can act as an invisible "detector", to report or take actionwhenever another Graphic Element enters a certain rectangle withinits world;2) It can be slaved to another Graphic Element in order to give thatelement a collision rectangle different in size or position from itsanimationRect.In either case, an appropriate collision procedure should beassigned to the "null" element.- ---Source code for null Graphic Element-----pascal void RenderNullElement(GrafElPtr element, GWorldPtr destGWorld){#pragma unused(destGWorld, element) //For debugging, could do //FrameRect(&element->animationRect);} GrafElPtr NewNullElement(GEWorldPtr world, OSType id, short plane, Rect *animRect){ GrafElPtr element; element = NewGrafElement(world, id, plane, sizeof(GrafElement), NoLoader, 0, 0); if (element) { element->animationRect = *animRect; element->copyMode = 0; element->flags = geShown; element->renderIt = RenderNullElement; element->drawIt = nil; element->drawData = nil; element->changeIntrvl = 0; } return element;}- ---end source code----- --Al Evans---- Al Evans | Graphic Elements: A new standard for | high-performance interactive Macintosh graphics.al@crucible.powertools.com | Available from mac.archive.umich.edu | /mac/misc/demo/graphicelementsdemo.sit.hqx--------------------------->From bfitz@ACM.ORGSubject: How do I read digital samples from an audio CD?Date: 23 Mar 1994 19:39:09 GMTOrganization: ACM Network ServicesHow can I read the digital audio data from an audio CD in a usable>From bfitz@ACM.ORGSubject: How do I read digital samples from an audio CD?Date: 23 Mar 1994 19:47:35 GMTOrganization: ACM Network ServicesHow can I read the digital audio data from an audio CD in a usable(mungeable) format? Ideally, I want to get 44Khz 16-bit stereo data whichI can then process myself (using custom soudn processing routines).I did the trick about running MoviePlayer (on a PowerMacintosh 7100/66 witha CD 300i), and using Open to convert a track from an audio CD into aQuickTime movie. Now what? I found a utility called Movie2Snd that lookslike it's supposed to make an 'snd ' resource out of the soundtrack of aQuickTime movie, but it fails on these (5 to 8 MB) movies.It "looks" like all I need to do is OpenMovieFile() NewMovieFromFile() CloseMovieFile() PutMovieIntoTypedHandle()but the QuickTime documentaion is very vague about sample rates, samplesize, etc. Also, given that MoviePlayer turned a 4 minute sample into amere 5.3 MB file indicates that it is probably saving this as a mono 8-bit22.254 Khz sample. I really want the original 44Khz 16-bit data.So, where do I go to find out how to get the audio data samples? Anydocuments I can read? Anyone's brain I can pick? Favors to exchange? -- Brian Fitzgerald --+++++++++++++++++++++++++++>From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)Date: 25 Mar 94 15:41:47 +1300Organization: University of Waikato, Hamilton, New ZealandIn article <2mq6cn$jr5@hopper.acm.org>, bfitz@ACM.ORG writes:>> ... the QuickTime documentaion is very vague about sample rates, sample> size, etc.This is all explained in "Inside Macintosh: QuickTime". Information aboutsamples is stored in sample descriptions; the descriptions for sound samplesare defined in Movies.h/p/def.> Also, given that MoviePlayer turned a 4 minute sample into a> mere 5.3 MB file indicates that it is probably saving this as a mono 8-bit> 22.254 Khz sample. I really want the original 44Khz 16-bit data.There is an "Options..." button in the movie open dialog. This is where youchoose sample size and rate, and the portion of the track you want to capture.Lawrence D'Oliveiro fone: +64-7-856-2889Info & Tech Services Division fax: +64-7-838-4066University of Waikato electric mail: ldo@waikato.ac.nzHamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00+++++++++++++++++++++++++++>From rrwood@ionews.io.org (Roy Wood)Date: 26 Mar 1994 11:22:16 -0500Organization: Internex Online (io.org) Data: 416-363-4151 Voice: 416-363-8676I know that QuickTime makes it possible to read audio CD files from AppleCD ROM drives (well, some Apple CD ROM drives), but I'm not sure that itworks with drives manufactured by other manufacturers (NEC, etc.). Doesanyone know if it is possible to use QuickTime to read audio files usinga non-Apple CD ROM drive?And as far as using QuickTime goes, it works, but it's kind of indirect.Has anyone played around with writing a device driver that allows the audiotracks to be read directly? I know there would be all kinds of nuisanceproblems with it, but it should be possible. Anybody listening on thisone? I'd be willing to give it a try if I could get some info about theSCSI commands that allow reading of data from the audio part of the disk....-Roy+++++++++++++++++++++++++++>From paulcho@ionews.io.org (paulcho)Date: 26 Mar 1994 11:38:31 -0500Organization: Internex Online (io.org) Data: 416-363-4151 Voice: 416-363-8676Article: 23239 of comp.sys.mac.programmer<bfitz@ACM.ORG> wrote:> How can I read the digital audio data from an audio CD in a usable> (mungeable) format? Ideally, I want to get 44Khz 16-bit stereo data which> I can then process myself (using custom soudn processing routines).> > I did the trick about running MoviePlayer (on a PowerMacintosh 7100/66 with> a CD 300i), and using Open to convert a track from an audio CD into a> QuickTime movie. Now what? I found a utility called Movie2Snd that looks> like it's supposed to make an 'snd ' resource out of the soundtrack of a> QuickTime movie, but it fails on these (5 to 8 MB) movies.> > It "looks" like all I need to do is> > OpenMovieFile()> NewMovieFromFile()> CloseMovieFile()> > PutMovieIntoTypedHandle()> PutMovieIntoTypedHandle work in RAM, you just ran out of memory. > but the QuickTime documentaion is very vague about sample rates, sample> size, etc. Also, given that MoviePlayer turned a 4 minute sample into a> mere 5.3 MB file indicates that it is probably saving this as a mono 8-bit> 22.254 Khz sample. I really want the original 44Khz 16-bit data. Look for the "options..." button in the StandPutFile after youpress "Convert..." in the StandGetFile. You can chose 44Khz,22Khz, 11 Khz, 8/16bit, mono/Stereo,selection start time and endtime etc. in the Audio CD Import Options dialog. > So, where do I go to find out how to get the audio data samples? Any> documents I can read? Anyone's brain I can pick? Favors to exchange?> > -- Brian Fitzgerald -- Anyway, try my DeskTopMovie program (part of MovieTrilogyavailable from sumex). You can import the movie and convert it toAIFF format. I tried on a 4:52 audio track and resulted in a 47MBfile. ________________________________________________________________Paul C.H. Ho paulcho@io.org Pink Elephant TechnologiesPaul_C.H._Ho@magic-bbs.corp.apple.com 74020.772@compuserve.com+++++++++++++++++++++++++++>From jwang@soda.berkeley.edu (James Wang)Date: 26 Mar 1994 21:53:15 GMTOrganization: Computer Science Undergrad Assoc., UCBerkeleyIn article <2n1nfo$m4n@ionews.io.org>, Roy Wood <rrwood@ionews.io.org> wrote:>does anyone know if it is possible to use QuickTime to read audio files using>a non-Apple CD ROM drive?it's not possible to digitize audio tracks from anything but an appleCD300, CD300i, or CD300+ using QuickTime 1.6.1.>And as far as using QuickTime goes, it works, but it's kind of indirect.>Has anyone played around with writing a device driver that allows the audio>tracks to be read directly? I know there would be all kinds of nuisancei read in MacUser that Disk-to-Disk is one commerical packagethat does this with good third-party drive support.+++++++++++++++++++++++++++>From dspman@aol.com (DSPman)Date: 26 Mar 1994 23:09:02 -0500Organization: America Online, Inc. (1-800-827-6364)I've read CD audio from a CD-300i into QuickTime movies but it's screwed up. The left and right channels intermittently switch. I had heard that there was a bug in the ROMs or something. Can anyone confirm this? Will Apple fix this?I expected to do this with my 840av but something is wrong.George Warnerwarnergt@aloft.att.com+++++++++++++++++++++++++++>From Manuel Veloso <veloso@netcom.com>Date: Sun, 27 Mar 1994 23:18:16 GMTOrganization: Ibex ProductionsIn article <2mq6cn$jr5@hopper.acm.org> , bfitz@ACM.ORG writes:>How can I read the digital audio data from an audio CD in a usable>(mungeable) format? Ideally, I want to get 44Khz 16-bit stereo data which>I can then process myself (using custom soudn processing routines).There was a code snippet posted to alt.sources.mac that letyou suck audio straight from the CD into a file. I'm notsure where the archives are, but it's up there.+++++++++++++++++++++++++++>From mxmora@unix.sri.com (Matt Mora)Date: 28 Mar 1994 13:41:37 -0800Organization: SRI International, Menlo Park, CAIn article <2n1nfo$m4n@ionews.io.org> rrwood@ionews.io.org (Roy Wood) writes:>Has anyone played around with writing a device driver that allows the audio>tracks to be read directly? I know there would be all kinds of nuisance>problems with it, but it should be possible. Anybody listening on this>one? I'd be willing to give it a try if I could get some info about the>SCSI commands that allow reading of data from the audio part of the disk....I believe Apple has already written one. It documented in a tech note.You make calls to the driver to control the cd rom drive. I'm using itin my cd application. The code to start you off is on the developer CD.Xavier -- ___________________________________________________________Matthew Xavier Mora Matt_Mora@sri.comSRI International mxmora@unix.sri.com333 Ravenswood Ave Menlo Park, CA. 94025--------------------------->From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)Subject: I crashed a Power Mac!Date: 23 Mar 94 16:43:47 +1300Organization: University of Waikato, Hamilton, New ZealandPeople, I have managed, without really trying, to write and distribute aPowerMac-incompatible program.Get your FTP self over to Sumex and pick up the file info-mac/disk/fix-icons.hqx(or something like that). That program completely goes off into the weeds ona 6100/60. I just tried sending an update, and it was (quite rightly) rejectedby one of the moderators, as it appears they are now testing submissions ona Power Mac. But of course the existing version already in the archive hasthe same problem.And you know what the problem is? I'm calling InitFonts before InitGraf.I don't know *where* I got the idea that this was the right thing to do--Ijust checked Inside Mac Vol I, and I am WRONG. Yet I've been doing this forgoodness knows how long, and I *never* got a crash on any other Mac before.Never.Gee, I feel so embarrassed about such an elementary stuffup...Lawrence D'Oliveiro fone: +64-7-856-2889Info & Tech Services Division fax: +64-7-838-4066University of Waikato electric mail: ldo@waikato.ac.nzHamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00+++++++++++++++++++++++++++>From wangd@CS.ColoState.EDU ( danny wang)Date: 23 Mar 94 05:42:55 GMTOrganization: Colorado State University -- Computer Science DepartmentI have crashed a friend's PowerMac(gee I wish I had one) with ResEdit. Doesthat count as a real crash? I will be trying to do some more REAL softwaretrials on that box pretty soon...ha, ha, ha. (evil grin)--Intel is not even half of intelligence....*******************************************************************************There's no such thing as chance; wangd@CS.ColoState.EDU And what to us seems merest accident wang@lamar.ColoState.EDUSprings from the deepest source of destiny. cs152bs1@lamar.ColoState.EDU --Johann Christoph Friedrich von Schiller Just livin' in my SANITARIUM. 1759-1805*******************************************************************************Speak 68040 and carry a PowerPC 620....+++++++++++++++++++++++++++>From d88-jwa@mumrik.nada.kth.se (Jon Wdtte)Date: 23 Mar 1994 08:35:50 GMTOrganization: Royal Institute of Technology, Stockholm, SwedenIn <1994Mar23.164347.26777@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:>And you know what the problem is? I'm calling InitFonts before InitGraf.That's a result of the new ROMs (which you will see in 68k Macs as well)not of the PowerPC as such.-- -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe -- "It was, in fact, cool as all get-out. Fortunately it was a little too late (historically speaking) to be groovy." -- Dennis Pelton+++++++++++++++++++++++++++>From jwbaxter@olympus.net (John W. Baxter)Date: Wed, 23 Mar 1994 10:30:08 -0800Organization: Internet for the Olympic PeninsulaIn article <1994Mar23.054255.19492@yuma>, wangd@CS.ColoState.EDU ( dannywang) wrote:> I have crashed a friend's PowerMac(gee I wish I had one) with ResEdit. Does> that count as a real crash? I will be trying to do some more REAL software> trials on that box pretty soon...ha, ha, ha. (evil grin)You probably only appeared to crash the Power Mac with ResEdit. For a longtime, the Memory Manager has been quietly helping developers by fixing someof their dumb errors (because there were far too many broken applicationsnot to). Some future Memory Manager will stop helping (and speed up as aresult). With the Power Mac, we see a step along the way: if a debuggeris installed, the Memory Manager does a user break, saying something like"Access Fault". If you say to continue (G command in MacsBug), processingcontinues, with the old fix-up code executed.This is supposed to encourage developers (who really should have a debugger<grin>) to fix their code.As it happens, one of the broken applications is ResEdit 2.1.1[If you only have half of the debugging installed (the "nub" but nolow-level debugger) you get a 30-second freeze while the nub looks madlyfor a debugger, then the nub presses on.]-- John Baxter Port Ludlow, WA, USA [West shore, Puget Sound] jwbaxter@pt.olympus.net+++++++++++++++++++++++++++>From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)Date: 24 Mar 94 10:47:51 +1300Organization: University of Waikato, Hamilton, New ZealandHow about this for the smallest program that will crash a PowerMac, butrun OK on a 68K Mac: #include <Fonts.h> void main(void) { InitFonts(); }(OK, so it doesn't actually do anything, so what did you expect.)Here's the compiled version, if you want to try it:(This file must be converted with BinHex 4.0)
#AJ#3"2q3"!!!!XS!N!4mY`:Let me know how it works for you!Lawrence D'Oliveiro fone: +64-7-856-2889Info & Tech Services Division fax: +64-7-838-4066University of Waikato electric mail: ldo@waikato.ac.nzHamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00+++++++++++++++++++++++++++>From nagle@netcom.com (John Nagle)Date: Thu, 24 Mar 1994 00:11:10 GMTOrganization: NETCOM On-line Communication Services (408 241-9760 guest)wangd@CS.ColoState.EDU ( danny wang) writes:>I have crashed a friend's PowerMac(gee I wish I had one) with ResEdit. Does>that count as a real crash? I will be trying to do some more REAL software>trials on that box pretty soon...ha, ha, ha. (evil grin) It's not a protected mode system. It's a Macintosh. Crashes just likea Macintosh. That's Apple's idea of a feature. John Nagle+++++++++++++++++++++++++++>From d88-jwa@mumrik.nada.kth.se (Jon Wdtte)Date: 24 Mar 1994 09:12:19 GMTOrganization: The Royal Institute of TechnologyIn <1994Mar24.104751.26808@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:>How about this for the smallest program that will crash a PowerMac, but>run OK on a 68K Mac:> #include <Fonts.h>> void main(void)> {> InitFonts();> }It is, of course, incorrect according to IM. It won't runon an ordinary Mac running Discipline.-- -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe -- Not speaking for IBM.+++++++++++++++++++++++++++>From pottier@fregate.ens.fr (Francois Pottier)Date: 24 Mar 1994 12:39:37 GMTOrganization: Ecole Normale Superieure, PARIS, FranceIn article <jwbaxter-230394103008@ptpm009.olympus.net>,John W. Baxter <jwbaxter@olympus.net> wrote:>result). With the Power Mac, we see a step along the way: if a debugger>is installed, the Memory Manager does a user break, saying something like>"Access Fault". If you say to continue (G command in MacsBug), processing>continues, with the old fix-up code executed.Could you be more precise ? Exactly when does an "Access Fault" happen, andin what way should current code be fixed ?-- Francois Pottier ___ ___ _ _ / ___ ___ ___pottier@dmi.ens.fr /_ /__/ /_| /| / / / / / / /__ / / \ / | / |/ /___ /__/ / ___/ _ /+++++++++++++++++++++++++++>From Manuel Veloso <veloso@netcom.com>Date: Sat, 26 Mar 1994 05:51:51 GMTOrganization: Ibex ProductionsIn article <2ms1m9$5ao@nef.ens.fr> Francois Pottier, pottier@fregate.ens.fr writes:>Could you be more precise ? Exactly when does an "Access Fault" happen, and>in what way should current code be fixed ?It was something about one of the exception vectors doing a stripaddress/retryon a non-24-bit clean address (ie: if an illegal address exception wascaused, the vector would strip and retry). It's in one of the newtech notes somewhere.+++++++++++++++++++++++++++>From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)Date: 28 Mar 94 10:09:16 +1300Organization: University of Waikato, Hamilton, New ZealandIn article <2mrlhj$8j4@news.kth.se>, d88-jwa@mumrik.nada.kth.se (Jon Wdtte) writes:> In <1994Mar24.104751.26808@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:>>>How about this for the smallest program that will crash a PowerMac, but>>run OK on a 68K Mac:>> #include <Fonts.h>>> void main(void)>> {>> InitFonts();>> }>> It is, of course, incorrect according to IM. It won't run> on an ordinary Mac running Discipline.Yeah, but lots of release software (including some from Apple!) won't rununder Discipline, am I right? So I'm not sure if that really counts... :-)(By the way, Jon, can you stop e-mailing me copies of your postings? One copyof your wisdom is enough. Thanks!)Lawrence D'Oliveiro fone: +64-7-856-2889Info & Tech Services Division fax: +64-7-838-4066University of Waikato electric mail: ldo@waikato.ac.nzHamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00+++++++++++++++++++++++++++>From ez006626@othello.ucdavis.edu (David Xavier Clancy)Date: Mon, 28 Mar 1994 07:19:12 GMTOrganization: University of California, Davisdanny wang (wangd@CS.ColoState.EDU) wrote:: I have crashed a friend's PowerMac(gee I wish I had one) with ResEdit. Does: that count as a real crash? I will be trying to do some more REAL software: trials on that box pretty soon...ha, ha, ha. (evil grin)ResEdit Crashes rather nicetly on a 68k mac too. In fact, it's good if itcrashes in the same places/conditions.--xav+++++++++++++++++++++++++++>From "Donpaul C. Stephens" <deathbird+@CMU.EDU>Date: Mon, 28 Mar 1994 08:01:31 -0500Organization: Senior, Electrical and Computer Engineering, Carnegie Mellon, Pittsburgh, PAAccording to the article in BYTE magazine,the Virtual Memory in the Power Macintosh line is implemented w/ Readonly and Read/Write blocks. The read only blocks <ie program code>cannot be altered. The R/W blocks can be altered by any stray programuntil Apple expands the services of the nano-kernelthe nano-kernel is the Hardware Abstraction Layer [HAL] on which thesystem runs. It is the only code that runs in supervisor mode in PowerMacthe rest, incl the OS runs in User mode [it probably makes it easier toemulate the 680x0 in the system if it is a user process like the restThe article then explains why the 680x0 macs are as crash prone aswindows: everything runs in Supervisor ModeNo, its not a feat to crash a Power Mac <it is harder to do than in a680x0 mac however>. But I wouldn't expect the OS to kill stray processesfor any memory violations until 1Q 95, when system 8 is rumored to bereleased--------------------------->From bdiamand@netcom.com (Ben Diamand)Subject: Multiple HD Reads, can it be done?Date: Thu, 17 Mar 1994 18:48:52 GMTOrganization: NETCOM On-line Communication Services (408 241-9760 guest)I'm pretty sure that the answer to this is 'no' for most Macs, but here goes anyway: Can the pre-quadra Mac II's(IIci, SE/30) perform simultaneous(sp?) reads from different scsi devices on the same scsi chain. As a further question, if I do ASYNC reads, will future Macs that can do this(assuming current ones cannot) work as expected?Thanks!Ben Diamandbdiamand@netcom.comALINK:bdiamand+++++++++++++++++++++++++++>From rang@winternet.mpls.mn.us (Anton Rang)Date: 27 Mar 1994 21:56:57 GMTOrganization: Minnesota AngstersIn article <764568523.AA03331@psybbs.durham.nc.us> Ben.Diamand%f1.n3641.z1@psybbs.durham.nc.us (Ben Diamand) writes:>I'm pretty sure that the answer to this is 'no' for most Macs, but here >goes anyway: Can the pre-quadra Mac II's(IIci, SE/30) perform >simultaneous(sp?) reads from different scsi devices on the same scsi >chain. The old SCSI manager does not support interleaved access to multipledevices on one SCSI chain. (So the answer is, "No.")>As a further question, if I do ASYNC reads, will future Macs that >can do this(assuming current ones cannot) work as expected? Well, the new SCSI manager (4.3) does support interleaved access, soyou can get to more than one device at a time. But your comment on async reads leads me to believe that you'rereally talking about disk drivers. (Are you using Read(), orSCSIRead()?) Disk drivers follow basically the same laws; if you try to do anasynchronous read, and you're on a pre-4.3 machine or have a pre-4.3driver, it will complete synchronously. However, if you have a 4.3machine and a 4.3 driver, *or* an accelerator which supportsasynchronous i/o, then an asynchronous read will work as you expect,as long as you're doing direct i/o to the driver. Yet another caveat. If you're going through the current filesystem, you can only have one I/O pending at a time, so you can onlyaccess one disk at a time, even if all the other conditions are OK fordoing things asynchronously. (As far as I know, anyway...anyone knowdifferently?)--Anton Rang (rang@winternet.mpls.mn.us)--------------------------->From long@mcntsh.enet.dec.com (Rich Long)Subject: PBDTGetAPPL on a network volume?Date: 20 MAR 94 15:16:46Organization: Digital Equipment CorporationI have some code that is using PBDTGetAPPL against all mounted volumes inorder to see if the owner of a given creator code is present. This works fineexcept for a disk that is mounted from a System 7 server. PBDTGetAPPL for thisvolume returns a -43 error instead of the afpItemNotFound I might expect. Thedocumentation is not very helpful -- any ideas? ( I am checking thehasDesktopMgr bit and PBDTGetPath returns no errors ).Thanks,Rich+++++++++++++++++++++++++++>From Tim S. <tim_swihart@quickmail.apple.com>Date: Mon, 28 Mar 1994 19:41:26 GMTOrganization: System UpdatesIn article <2mib3e$ph9@nntpd.lkg.dec.com> Rich Long, long@mcntsh.enet.dec.comwrites:>I have some code that is using PBDTGetAPPL against all mounted volumes in>order to see if the owner of a given creator code is present. This works fine>except for a disk that is mounted from a System 7 server. PBDTGetAPPL for this>volume returns a -43 error instead of the afpItemNotFound I might expect. The>documentation is not very helpful -- any ideas? ( I am checking the>hasDesktopMgr bit and PBDTGetPath returns no errors ).>>Thanks,>RichI had a similar problem when writing BNDL Banger - you have to special caseservers and use AppleTalk calls instead. I special cased them and ignoredthem (since servers typically don't let users have enough privs to munge intheir desktop databases and that's BNDL Banger's sole reason for existing). You'll need to wade through the AppleTalk headers/docs...Hope that helps,Tim S.My opinions are my own. They're my feet and I'll put them in my mouth if Iwant to. Do not expose to open flame. Some Assembly required. Remove beforeflight. Under penalty of law, do not remove this tag. Caution, contains silicagel, do not eat. Do not read while operating a motor vehicle or heavyequipment. In case of eye contact, flush with water. This supersedes allprevious notices.--------------------------->From quinn@cs.uwa.edu.au (Quinn "The Eskimo!")Subject: PEF, XCOFF Info WantedDate: Mon, 28 Mar 1994 09:45:16 +0800Organization: Department of Computer Science, The University of Western AustraliaIn article <2mv3b4$oa2@news.kth.se>, d88-jwa@mumrik.nada.kth.se (JonWdtte) wrote:>You should remove the cfrg resource if you remove the data fork PEF.Talking about PEF... (: Where can I find a good description of theinternals of the PEF and XCOFF file formats?-- Quinn "The Eskimo!" <quinn@cs.uwa.edu.au> "Support HAVOC!"Department of Computer Science, The University of Western Australia+++++++++++++++++++++++++++>From platypus@cirrus.som.cwru.edu (Gary Kacmarcik)Date: 28 Mar 1994 03:15:46 GMTOrganization: Case Western Reserve University, Cleveland, Ohio (USA)In article <quinn-280394094516@eriodon.cs.uwa.oz.au> quinn@cs.uwa.edu.au (Quinn "The Eskimo!") writes:>> Talking about PEF... (: Where can I find a good description of the> internals of the PEF and XCOFF file formats?if you want a Q&D description, you can probably get a good idea from theDumpPEF and DumpXCOFF MPW tools.if you want a "complete" description of PEF, you need to license it fromApple.if you want more info about XCOFF, you can get the O'Reilly book"Understanding and Using COFF" (Gintaras R. Gircys), and try to get someof the headers from an RS/6000. XCOFF is based on COFF, so the book'llget you most of the way there. IBM also has a book that describes theXCOFF format, but i don't have the reference handy.-gary j kacmarcikplatypus@curie.ces.cwru.edu--------------------------->From mdtaylor@apple.com (Mark Taylor)Subject: QuickDraw QuestionDate: Tue, 22 Mar 1994 18:18:03 GMTOrganization: Apple Computer, Inc.Greetings, I have a very irritating QuickDraw problem which I'm hoping someone canadvise me about. It could be it's hopeless... In my app, I put up a marquee as a target "zone" for dragging and dropping.The marquee is circular, so I xor a FrameOval to create it. Unfortunately,whenever my custom cursor is within the oval, the image of the cursor isalternately hidden and shown. To the user this looks like a vibratingcursor. I've tried using a region to draw the marquee with the same result. I'vealsodone the marquee as a rectangle (as a test) and the problem goes away -however, I really need a circular target - not a rectangle. I'm guessing that QuickDraw obscures the cursor during drawing if thecursor iswithin an oval or region. Does this sound right? Is this true? If so, isthere anyway to defeat this? Hope someone can help! Mark+++++++++++++++++++++++++++>From KLUEV@jonathan.srcc.msu.suDate: Sat, 26 Mar 1994 16:15:14 +0300Organization: (none)In article <mdtaylor-220394101803@17.142.0.47>mdtaylor@apple.com (Mark Taylor) writes:> >In my app, I put up a marquee as a target "zone" for dragging and dropping.>The marquee is circular, so I xor a FrameOval to create it. Unfortunately,>whenever my custom cursor is within the oval, the image of the cursor is>alternately hidden and shown. To the user this looks like a vibrating>cursor.> >I've tried using a region to draw the marquee with the same result. I've>also>done the marquee as a rectangle (as a test) and the problem goes away ->however, I really need a circular target - not a rectangle.> >I'm guessing that QuickDraw obscures the cursor during drawing if the>cursor is>within an oval or region. Does this sound right? Is this true? If so, is>there anyway to defeat this? QuickDraw always Shield/Show cursor when it is drawing onscreen orcopying from screen. The actual hiding of cursor occurred only ifdrawing can disturb cursor (i.e. drawing's and cursor's rects overlap).This vibrating cursor doesn't go away in case of rects, but QDdraws rects much more faster than ovals or regions. A little couldbe done about this flickering. One way to minimize this flickering is to minimize your drawing.1.Don't 'move' marquees, stop them.2.Draw only when user moves mouse.3.When you need to draw, do a minimal number of QD calls. (Finder does this.). So, if you are doing something like that: "PenMode (xor) FrameRgn (Old) - To show first RgnWhenever user moves mouse: FrameRgn (Old) - To erase old FrameRgn (New) - To draw new" (2 QD operations).try to change your code to something like this: "PenMode (xor) CopyRgn (Old, Temp); InsetRgn (Temp, 1, 1); XorRgn (Old, Temp, Old); - To create one pixel "outline" region. PaintRgn (Old); - To show firstWhenever user moves mouse: /* Create New Rgn using the same tehnique as Old. */ XorRgn (Old, New, Temp); - Some preparation PaintRgn (Temp); - Makes all drawing" (1 QD operation).If you want to do this with ovals, just convert them to regions.This should reduce cursor flickering.Michael Kluev.+++++++++++++++++++++++++++>From kenlong@netcom.com (Ken Long)Date: Sun, 27 Mar 1994 00:05:06 GMTOrganization: NETCOM On-line Communication Services (408 241-9760 guest)Quickdraw probably obscures the cursor in such areas unless you tell it otherwise. In Color It 2.3, if you make a selection, and move the cursor within the bounds of the region, it changes to a mirror image of the standard arrow cursor to facilitate dragging the selection.Therefore, in order to track down source for such goings on, my approach would be to get some which does, or may do, this.First choice would be C source - Pascal if no C could be found.Logical downloadable targets: DTS-Draw (Apple ftp). Get the source and do a SerchFiles 1.3 search for the string "cursor." It may be prudent to run the project and see if the cursor (a) is visible within a selection, (b) changes if so.Alternative choice: Image 1.49 or better. Get the built app and test as before. If it does what you want, get the current source and do the string search to track down the routines.A knowledgeable programmer could probably just give you a fragment or snippet. But if you had no one to ask for a fast answer, string searches of running C source are so fast they are almost instantaneous.-Ken---------------------------->From deway@css.itd.umich.edu (Doug Way)Subject: Quickdraw Blend Function Inaccurate?Date: 23 Mar 1994 22:41:03 GMTOrganization: University of Michigan ITD/User ServicesDoes anyone out there know if there are any innaccuracies with Quickdraw'sblend function? That is, the process of blending two colors together byusing PenMode(blend) and drawing one color on top of another? (I seemto vaguely remember someone talking about this here long ago, so if thisis true, please post!)I'm trying to write a game which displays objects being reflected on acolored surface. The simplest way to do this seemed to be to draw withPenMode(blend) so that the object colors and surface colors are blendedtogether to simulate a reflection. I know that Quickdraw uses thefunction: weight * sourceColor + (65535 - weight) * destColorblendedColor = --------------------------------------------------- 65535This function determines the blend for each of the red, green and bluecomponents, where weight is a number between 0 and 65535. When itdetermines the RGB values of the blended color, Quickdraw then (presumably)looks up the closest color in the palette which matches, and draws thatcolor.This is where I seem to be having a problem. I even went through thetrouble of setting up my own palette which would contain the exact colorswhich would need to be blended. But Quickdraw sometimes seems to pickthe wrong color as the blended color. The color is not usually off bymore than 5 or 10%, but that's still pretty bad in my book.Here's a more concrete example. If I have:sourceColor.red = 35000 and destColor.red = 45000sourceColor.green = 7000 destColor.green = 12000sourceColor.blue = 12000 destColor.blue = 17000and the blend weight = 8000then the blended color should be:blendedColor.red = 43800blendedColor.green = 11400blendedColor.blue = 16400So, early on in my program I add these three colors to the palette (alongwith a bunch of others). I then draw the destination color (destColor)on the screen. The PenMode is then set to blend (w/ weight = 8000), andthe source color is drawn on top of the destColor. For some reason, theresulting color is still the destColor, not the blendedColor it should be.I know the blended color is available in the color table, because I canuse RGBForeColor (or PMForeColor) to set it and draw it somewhere elseon the screen.(Hmmm, I just remembered that I'm doing this on an offscreen pixmap, butthis shouldn't be a problem since both offscreen and onscreen pixmapshave the same .pmTable color table.)Well, any ideas? I realize there may be some quirk in my code which iscausing this, but I wanted to see if anyone knew about any known problemsbefore I went on an all-out effort to isolate the problem. I'll gladlygive credit in my game to anyone who can help out. Thanks!/---------------DISCLAIMER:----My opinions are, remarkably, exactly the----\| same as those of my employer. In fact, || Doug Way (Bebound!) I am merely a mouthpiece through which |\---deway@css.itd.umich.edu----their collective thoughts pass unaltered.---/+++++++++++++++++++++++++++>From lowry@shiva.eche.ualberta.ca (Brian Lowry)Date: 24 Mar 1994 16:19:38 GMTOrganization: Chem Eng - Univ of AlbertaIn article <2mqghv$s97@lastactionhero.rs.itd.umich.edu>,deway@css.itd.umich.edu (Doug Way) wrote:> Does anyone out there know if there are any innaccuracies with Quickdraw's> blend function? That is, the process of blending two colors together by> using PenMode(blend) and drawing one color on top of another?[details omitted]> (Hmmm, I just remembered that I'm doing this on an offscreen pixmap, but> this shouldn't be a problem since both offscreen and onscreen pixmaps> have the same .pmTable color table.) How can a blend be accurate on a CLUT device? The inverse colour tableis only five bits, so you're always going to have errors... A bettersolution might be to use 24 bit GWorlds offscreen and then dither them tothe CLUT device, since this would have the added benefit of not making 16and 24 bit users' screens look like 8 bit messes.-- Brian Lowry+++++++++++++++++++++++++++>From lari@cs.unc.edu (Humayun Lari)Date: 24 Mar 1994 16:01:28 -0500Organization: The University of North Carolina at Chapel HillIn article <lowry-240394082729@lowry.eche.ualberta.ca>,Brian Lowry <lowry@shiva.eche.ualberta.ca> wrote:>In article <2mqghv$s97@lastactionhero.rs.itd.umich.edu>,>deway@css.itd.umich.edu (Doug Way) wrote:>>> Does anyone out there know if there are any innaccuracies with Quickdraw's>> blend function? That is, the process of blending two colors together by>> using PenMode(blend) and drawing one color on top of another?[snip]> How can a blend be accurate on a CLUT device? The inverse colour table>is only five bits, so you're always going to have errors... A better>solution might be to use 24 bit GWorlds offscreen and then dither them to>the CLUT device, since this would have the added benefit of not making 16>and 24 bit users' screens look like 8 bit messes.Doug, since the default inverse color table is 4-bit, you may want to try aMakeITable(NULL, NULL, 5) to generate a 5-bit inverse table for the currentdevice. Check IM 5 for details -- I think the 5-bit inverse table requires32K, and MakeITable requires something like 79K just to work, so you needto be slightly concerned about memory.'Course, this still won't be perfect, but it'll be better than the default.Note that the problem with using 24-bit worlds is that dithering is slowand can make 8-bit users' screens look messy. Experiment...Humayun Lari(lari@cs.unc.edu)+++++++++++++++++++++++++++>From deway@css.itd.umich.edu (Doug Way)Date: 28 Mar 1994 06:25:10 GMTOrganization: University of Michigan ITD/User ServicesHumayun Lari (lari@cs.unc.edu) wrote:: Brian Lowry <lowry@shiva.eche.ualberta.ca> wrote:: [snip]: > How can a blend be accurate on a CLUT device? The inverse colour table: >is only five bits, so you're always going to have errors... A better: >solution might be to use 24 bit GWorlds offscreen and then dither them to: >the CLUT device, since this would have the added benefit of not making 16: >and 24 bit users' screens look like 8 bit messes.: Doug, since the default inverse color table is 4-bit, you may want to try a: MakeITable(NULL, NULL, 5) to generate a 5-bit inverse table for the current: device. Check IM 5 for details -- I think the 5-bit inverse table requires: 32K, and MakeITable requires something like 79K just to work, so you need: to be slightly concerned about memory.Thanks for the info. After reading Brian's response, I went back & readthe Color Manager chapter of IM 5, and figured out that the 4-bit inversetable was the problem. (I'd been wasting my time looking in the PaletteManager & Quickdraw chapters before.) 24-bit screens are not an option here,since this is a high-speed game. (Believe it or not, I'm getting 30 framesper second on a IIsi drawing two (fairly small) objects with blendedreflections.) In fact, 8 bits is plenty, because there is a small, fixednumber of colors in each object & in the reflecting wall, and I specificallyadd the possible blending combinations to the palette ahead of time.For example, if there are 10 colors in the objects, and 8 colors in thewall, then there will be 10*8=80 possible blended colors which I precalculateand add to the palette. No need for 24 bits. Although I do understand whatyou mean about the color lookup being inaccurate anyway.I'll try the 5-bit table. That should descrease the inaccuracy by half,so that may be good enough. I noticed that IM 5 mentioned that it'spossible to create your own custom lookup table for even greater accuracy.Is this at all practical?/---------------DISCLAIMER:----My opinions are, remarkably, exactly the----\| same as those of my employer. In fact, || Doug Way (Bebound!) I am merely a mouthpiece through which |\---deway@css.itd.umich.edu----their collective thoughts pass unaltered.---/--------------------------->From danprice@delphi.comSubject: Read-Save Styled Text CodeDate: Sun, 27 Mar 94 17:17:20 -0500Organization: Delphi (info@delphi.com email, 800-695-4005 voice) I'm trying to get some read/save styled text code of mine to work but havehad NO success. I was in a bookstore the other day and noticed that IM:TEXThas such code, but I am only a poor student who doesn't have 40$ to shell. Anybody have this code that tehy could mail me? I'm using think Pascal. -dp +++++++++++++++++++++++++++>From mxmora@unix.sri.com (Matt Mora)Date: 28 Mar 1994 13:49:33 -0800Organization: SRI International, Menlo Park, CAIn article <xO-vpwg.danprice@delphi.com> danprice@delphi.com writes:> >I'm trying to get some read/save styled text code of mine to work but have>had NO success. I was in a bookstore the other day and noticed that IM:TEXT>has such code, but I am only a poor student who doesn't have 40$ to shell.> >Anybody have this code that tehy could mail me? I'm using think Pascal.This should get you going. GetFNum('times', familyID); TextFont(familyID); Textsize(12); myTE := TEStylNew(r, r); {important! I was using the old call duh:)} TextHandle := GetResource('TEXT', 128); StylHandle := stScrpHandle(GetResource('styl', 128));{ TEInsert(TextHandle^, GetHandleSize(TextHandle), myTE);}{ TESetSelect(0, $8000, myTE);}{ SetStylHandle(StylHandle, myTE);} TEStylInsert(TextHandle^, GetHandleSize(TextHandle), StylHandle, myTE);{TESetSelect(0, 0, myTE);} myTe^^.just := 1; TECalText(myTE); TEUpdate(r, myTE);Xavier-- ___________________________________________________________Matthew Xavier Mora Matt_Mora@sri.comSRI International mxmora@unix.sri.com333 Ravenswood Ave Menlo Park, CA. 94025--------------------------->From cconstan@epdiv1.env.gov.bc.ca (Carl B. Constantine)Subject: Try 3: Movie Credit Scrolling - How?Date: Thu, 17 Mar 1994 10:04:43 -0800Organization: Ministry of Environment, Lands & ParksSorry for the multiple posts (if your server recieved multiple posts) butour NNTP server is having problems.I would like to know how to do movie credit style scrolling like I haveseen in many people's about box's. Can someone give me a code snippet oranything like that?Thanks in advance.-- =========================================================================Carl B. Constantine B.C. Environment, Lands & ParksEnd-User Support Analyst CCONSTAN@epdiv1.env.gov.bc.ca+++++++++++++++++++++++++++>From kenlong@netcom.com (Ken Long)Date: Fri, 18 Mar 1994 03:10:36 GMTOrganization: NETCOM On-line Communication Services (408 241-9760 guest)Carl:There's some source for a program called "Words Alive" which has a "curtains" type thing in its about box. It starts with a picture and then a pixel-at-a-time "curtain" raises (the picture goes up) revealing some more credits.There are sideways auto-scrolling texts' which should not be hard to make vertical, like the "Marquee" stuff I recently posted (did I send you the file?).I've got some source that scrolls up or down just by GetMouse-while-StillDown offset. I was actually going to toss what I have on your server, but rework the project into a more diversified demo and then post it on a.s.m.The basic trick is offsetting or scrolling (same difference) the rect. or rgn according to what you specify. It can be via a key, the mouse or automatic.I've got one Pascal project, where the about in a blank pDB, and a little line shows up, on center. It gets bigger and you see that it's text. It gets to 14pt and nicely fits into the box, hangs about 60, then keeps on zoomin' up closer (""). Then the box closes.That particular effect, in reverse, with a vertical (-) offset would be similar to the opening sequence in StarWars.Also, the MSG demo, doing all it's wipes and other effects, may indicate an action to take. But regarding text? I don't know.The one I have offsets text kinda like the "Grabber" tool. Making it auto should be a snap.-Ken-+++++++++++++++++++++++++++>From Kevin Marks <Kevin@pinner.demon.co.uk>Date: Sat, 19 Mar 1994 17:46:06 GMTOrganization: MeIn article <cconstan-170394100443@eusacbc.env.gov.bc.ca> Carl B.Constantine, cconstan@epdiv1.env.gov.bc.ca writes:>I would like to know how to do movie credit style scrolling like I have>seen in many people's about box's. Can someone give me a code snippet or>anything like that?QuickTime's Text Tracks will do this automatically if you set a fewflags, but the docs are a bit flaky.>From Carl.B..Constantine%f1.n3641.z1@psybbs.durham.nc.us (Carl B. Constantine)Subject: Try 3: Movie Credit Scrolling - How?Date: 17 Mar 94 23:04:43 GMTOrganization: (none)Organization: Ministry of Environment, Lands & ParksSorry for the multiple posts (if your server recieved multiple posts) butour NNTP server is having problems.I would like to know how to do movie credit style scrolling like I haveseen in many people's about box's. Can someone give me a code snippet oranything like that?Thanks in advance.-- =========================================================================Carl B. Constantine B.C. Environment, Lands & ParksEnd-User Support Analyst CCONSTAN@epdiv1.env.gov.bc.ca+++++++++++++++++++++++++++>From paulcho@ionews.io.org (paulcho)Date: 26 Mar 1994 11:28:54 -0500Organization: Internex Online (io.org) Data: 416-363-4151 Voice: 416-363-8676Kevin Marks <Kevin@pinner.demon.co.uk> wrote:>QuickTime's Text Tracks will do this automatically if you set a few>flags, but the docs are a bit flaky. You can use my TextMovie program(part of MovieTrilogy availiableon sumex) to create the QuickTime Text track movie. Then all youhave to do is load and play the movie. ________________________________________________________________Paul C.H. Ho paulcho@io.org Pink Elephant TechnologiesPaul_C.H._Ho@magic-bbs.corp.apple.com 74020.772@compuserve.com +++++++++++++++++++++++++++>From zobkiw@datawatch.com (joe zobkiw)Date: Mon, 28 Mar 1994 13:08:31 GMTOrganization: Datawatch CorporationIn article <2n1ns6$n0f@ionews.io.org>, paulcho@ionews.io.org (paulcho)wrote:> > > Kevin Marks <Kevin@pinner.demon.co.uk> wrote:> >QuickTime's Text Tracks will do this automatically if you set a few> >flags, but the docs are a bit flaky.> > You can use my TextMovie program(part of MovieTrilogy availiable> on sumex) to create the QuickTime Text track movie. Then all you> have to do is load and play the movie.> If al lyou want is scrolling credits just create a TEHandle in your window,fill it with styled text from a resource, and TEScroll it...when it reachesthe end, reset your scroll position to the top. That's it! If you wantpictures, you can ScrollRect a PICT resource.____________________________________________________________/_/_/_/ Joe Zobkiw ,,, _/ Senior Software Engineer - - _/ Datawatch Corporation L_/_/_/_/ zobkiw@datawatch.com ---------------------------->From rhn@netcom.com (Ron Nicholson)Subject: making fat binaries questionDate: Wed, 23 Mar 1994 08:36:51 GMTOrganization: NETCOM On-line Communication Services (408 241-9760 guest)I'm using the Metrowerks Codewarrior Gold DR1 compilers. I've got boththe 68k and PPC versions of my applications working. How do I take the2 applications and make a fat binary? Do I need any special resourcesnot found in either of the 2 processor specific apps? Or do I justpaste all the resources and the data fork of the PPC app together intoone big glob? Is there a utility to do this?Thanks,Ron Nicholson rhn@netcom.com#include <std.disclaimer>(hey, I'm just a hardware guy, doing software for fun.)+++++++++++++++++++++++++++>From jwbaxter@olympus.net (John W. Baxter)Date: Wed, 23 Mar 1994 10:46:21 -0800Organization: Internet for the Olympic PeninsulaIn article <rhnCn3zxF.LwA@netcom.com>, rhn@netcom.com (Ron Nicholson)wrote:> I'm using the Metrowerks Codewarrior Gold DR1 compilers. I've got both> the 68k and PPC versions of my applications working. How do I take the> 2 applications and make a fat binary? Do I need any special resources> not found in either of the 2 processor specific apps? Or do I just> paste all the resources and the data fork of the PPC app together into> one big glob? Is there a utility to do this?One method:Build the 68K version. Use the result (or a suitably named copy) as theresource file when you build the ppc version. [Note that the presence ofthe 'cfrg' resource in that 68K version is likely to annoy the system ifyou run the 68K version on a Power Mac.]-- John Baxter Port Ludlow, WA, USA [West shore, Puget Sound] jwbaxter@pt.olympus.net+++++++++++++++++++++++++++>From rhn@netcom.com (Ron Nicholson)Date: Sun, 27 Mar 1994 19:45:40 GMTOrganization: NETCOM On-line Communication Services (408 241-9760 guest)In article <jwbaxter-230394104621@ptpm009.olympus.net>,John W. Baxter <jwbaxter@olympus.net> wrote:>>One method:>Build the 68K version. Use the result (or a suitably named copy) as the>resource file when you build the ppc version. [Note that the presence of>the 'cfrg' resource in that 68K version is likely to annoy the system if>you run the 68K version on a Power Mac.]>OK, I used this method to build a fat binary. The resulting file seemsto run just fine on both an SE/30 and a Power Mac (except for the fact itruns 29 times faster on the 7100!) But doesn't the 'cfrg' resource needto be modified to indicate that the app is a fat binary and not justa pcc only app?Is there a way for a fat application to toggle or have the user selectwhether to run in native or emulated mode on a Power Mac?I have Codewarrior Gold, Develop 17 and the newest Macsbug. What othercritical items might I need off of the Mac on Risc SDK in order tobuild Power Mac apps correctly?Thanks,Ron Nicholson rhn@netcom.com#include <std.disclaimer>---------------------------End of C.S.M.P. Digest**********************